import { dayjs } from 'element-plus'
import Alymodel from '../../../mysql_interface/model'
import study from '../../../mysql_interface/studycodemodel'

export const Question: study.Iquestion = {
  ID: undefined,
  type: "代码",
  context: "",
  htmlcontext: undefined,
  answer: { answer: "", options: [] },

  answeranalysis: "",
  knowledgepoints: [],
  label: [],
  difficulty: undefined,
  testcases: [
    { input: "", output: "", isshow: false, score: undefined, type: 'data' },
  ],
  memorylimit: 128,
  timelimit: 1000,
  rightkey: undefined,
  name: '',
  tips: '',
  background: '',
  inputformat: '',
  outputformat: '',
  isopen: undefined,
  scorecalculation: 'add',
  range: 'user',
  source: '',
  dataform: undefined,
  info: undefined,
  codetype: undefined,
  dataformid: undefined,
  isspecialjudge: false,
  specialjudgeid: undefined,
  time: undefined,
  matchname: undefined,
  errormessage: undefined,
  htmlerrormessage: undefined,
  goldremarks: undefined,
  isteamshow: undefined,
  exampletest: [{}]
}

export const Questionbank: study.Iquestionbank = {
  ID: 0,
  name: "",
  type: 'code',
  context: '',
  label: [],
  show: true,
  isopen: true,
  usertype: 'user',
  activityquestionbank: [],
  questionquestionbank: [],
  top: 0
}

export const Activity: study.Iactivity = {
  name: '',
  context: '',
  userid: undefined,
  url: '',
  signupstarttime: undefined,
  signupendtime: undefined,
  activitystarttime: undefined,
  activityendtime: undefined,
  banner: undefined,
  isnotice: true,
  isshowquestionname: false,
  isdownload: 1,
  isranking: false,
  duration: 0,
  isduplicate: true,
  isexample: true,
  language: 'C++',
  isinvitation: false,
  isshowactivityquestionbank: false,
  isshow: true,
  isapplication: true,
  customerserviceid: 1,
  format: 'OI'
}

export const Article: study.Iarticle = {
  ID: undefined,
  showtype: '1',
  top: undefined,
  name: '',
  userid: undefined,
  releasetime: new Date,
  readnumber: 0,
  context: '',
  readnumberride: 1
}

export const User: study.Iuser = {
  ID: undefined,
  remarks: undefined,
}

export const Team: study.Iteam = {
  ID: 0,
  name: '',
  info: '',
  type: 'vip',
  grade: 1,
  createdAt: new Date,
  updatedAt: new Date,
  userid: 0,
  isranking: true,
  isadminshowactivity: false,
  isadminshowquestion: false
}

export const Teamtask: study.Iteamtask = {
  ID: undefined,
  name: '',
  context: '',
  userid: undefined
}

export const Teamuser: study.Iteamuser = {
  ID: undefined,
  userid: undefined,
  teamid: undefined
}

export const Questiontestcasesuser: study.Iquestiontestcasesuser = {

}

export const Notice: study.Inotice = {
  ID: undefined,
  userid: undefined,
  name: undefined,
  context: undefined,
  htmlcontext: undefined,
  createdAt: undefined,
  updatedAt: undefined,
  info: undefined,
  description: undefined,
  teamid: undefined,
}

export const Teanjob: study.Iteamjob = {
  starttime: new Date(dayjs().format('YYYY-MM-DD 00:00:00')),
  questionac: 75,
  questionnum: 1,
  type: 'question',
  isall: true,
  endtime: new Date(dayjs().format('YYYY-MM-DD 23:59:59'))
}

export const Lession: Alymodel.IMlession = {
  lessionName: '',
  lessionInfo: '',
  num: 1,
  type: 'video'
}

export const Coursesection: Alymodel.IMcoursesection = {
  name: '',
  type: 'video',
  info: '',
}